#ifndef ModulsAddressSpaceH
  #define ModulsAddressSpaceH



/****************************************************************************************************/
/*                          L O W    L E V E L :    F L A G'S    T Y P E S                          */
/****************************************************************************************************/

/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/





/****************************************************************************************************/
/*                          R A M    C O N S T A N T S :    A D D R E S S                           */
/****************************************************************************************************/
//ALL TYPES OF MODULS
  #define aModTyp           0               //
  #define aHWver          ( aModTyp + 1 )   //
  #define aSWver          ( aModTyp + 2 )   //
  #define aBufSize        ( aModTyp + 3 )   //
  #define aNumbOfCH1      ( aModTyp + 4 )   //
  #define aNumbOfCH2      ( aModTyp + 5 )   //
  #define aNumbOfCH3      ( aModTyp + 6 )   //
  #define aNumbOfCH4      ( aModTyp + 7 )   //
  #define aModID          ( aModTyp + 10 )  //
//ONLY AIN MODULS
  #define aFadc             20              //
  #define aNmean          ( aFadc + 1 )      //
  #define aCtoU           ( aFadc + 2 )      //
  #define aUtoI           ( aFadc + 4 )      //
  #define aDelay          ( aFadc + 6 )      //
  #define aScript         ( aFadc + 38 )     //
//ONLY DIN MODULS
  #define aDiChTyp          80               //
  #define aEdgeTyp        ( aDiChTyp + 2 )   //
  #define aClkTyp         ( aDiChTyp + 4 )   //

//  #define aRstEn          ( aDiChTyp + 4 )   //
  #define aKd             ( aDiChTyp + 6 )   //
//ONLY AKRS MODULS
  #define aUARTsets         130              //
  #define aAKRSst         ( aUARTsets + 2 )  //
  #define aDelayByte      ( aUARTsets + 3 )  //
  #define aDelayAnsw      ( aUARTsets + 4 )  //
  #define aDelayReQuery   ( aUARTsets + 6 )  //
//ONLY AIN & DIN MODULS
  #define aChPwrTyp         140              //
  #define aChEn           ( aChPwrTyp + 2 )  //
  #define aPwrMod1        ( aChPwrTyp + 4 )  //
  #define aPwrMod2        ( aChPwrTyp + 6 )  //
  #define aMeasBreak      ( aChPwrTyp + 8 )  //
  #define aPwrDelay       ( aChPwrTyp + 10 ) //
//ALL TYPES OF MODULS
  #define aCR1Set           170              //
  #define aCR1Rst         ( aCR1Set + 1 )    //
//ONLY AIN & DIN MODULS
  #define aChPwrOn        ( aCR1Set + 4 )    //
  #define aChPwrOf        ( aCR1Set + 6 )    //
//ONLY AIN MODULS
  #define aMeasStrt       ( aCR1Set + 8 )    //
//ONLY ADO MODULS
  #define aDAC              180              //
  #define aROset          ( aDAC + 16 )      //
  #define aROrst          ( aROset + 1 )      //
  #define aDOset          ( aROset + 2 )      //
  #define aDOrst          ( aROset + 3 )      //
//ONLY DIN MODUL
  #define aDIN_AKN          200    //
//ALL TYPES OF MODULS
  #define aCR1st            230              //
  #define aKey            ( aCR1st + 1 )     //
//ONLY AIN & DIN MODULS
  #define aChPwr          ( aCR1st + 4 )     //
  #define aChSC           ( aCR1st + 6 )     //
//ONLY AIN MODULS
  #define aMeasRdy        ( aCR1st + 8 )     //
  #define aMeasFin        ( aCR1st + 10 )    //
  #define aMeasErr        ( aCR1st + 12 )    //
  #define aRelaySt        ( aCR1st + 14 )      //
  #define aADCval           270              //
//ONLY DIN MODULS
  #define aDSCRTst          334              //
  #define aCOUNTval       ( aDSCRTst + 2 )   //
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/


/****************************************************************************************************/
/*                             M E A S U R I N G   S T A R T   F L A G S                            */
/****************************************************************************************************/
  #define fMeasOff        ( 0 << 0 )   //
  #define fMeasInfinity   ( 1 << 7 )   //
  #define fMeasScript     ( 1 << 6 )   //
  #define fMeasChOn       ( 1 << 5 )   //
  #define fMeasSingle     ( 1 << 4 )   //
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/

/****************************************************************************************************/
/*                                                     */
/****************************************************************************************************/
  #define SET_O1          ( 1 << 0 )   //
  #define SET_O2          ( 1 << 1 )   //
  #define SET_O3          ( 1 << 2 )   //
  #define SET_O4          ( 1 << 3 )   //
  #define SET_O5          ( 1 << 4 )   //
  #define SET_O6          ( 1 << 5 )   //
  #define SET_O7          ( 1 << 6 )   //
  #define SET_O8          ( 1 << 7 )   //
  #define RST_O1          ( 1 << 8 )   //
  #define RST_O2          ( 1 << 9 )   //
  #define RST_O3          ( 1 << 10)   //
  #define RST_O4          ( 1 << 11)   //
  #define RST_O5          ( 1 << 12)   //
  #define RST_O6          ( 1 << 13)   //
  #define RST_O7          ( 1 << 14)   //
  #define RST_O8          ( 1 << 15)   //

/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/





/****************************************************************************************************/
/*                          C O N T R O L   R E G I S T E R 1 st  F L A G S                         */
/****************************************************************************************************/
  #define fLDst           ( 1 << 7  )   //
  #define fSCst           ( 1 << 6  )   //
  #define fADCerr         ( 1 << 5  )   //
  #define fFLASHerr       ( 1 << 4  )   //
  #define fMODEst         ( 1 << 3  )   //
  #define fDATArdy        ( 1 << 2  )   //
  #define fSMBAst         ( 1 << 1  )   //




/****************************************************************************************************/
/*                   R A M    C O N S T A N T S :    V A R I B L E'S   L E N G T H                  */
/****************************************************************************************************/

/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/


/****************************************************************************************************/
/*                   R A M    C O N S T A N T S :    N U M B E R    O F    B Y T E S                */
/****************************************************************************************************/

/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/


/****************************************************************************************************/
/*                           R A M    C O N S T A N T S :    F L A G S                              */
/****************************************************************************************************/

/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/


/****************************************************************************************************/
/*                   R A M    C O N S T A N T S :    W R I T E    M A S K                           */
/****************************************************************************************************/

/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/



/*!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!*/
/*!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!!endif!!*/
#endif